home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10202 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: news.crystalball.com!news
  2. From: Larry Weiss <lfw@oc.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: CONVERTING INTEGER TO ASCII??????
  5. Date: Fri, 15 Mar 1996 17:13:03 -0600
  6. Organization: crystalball.com
  7. Message-ID: <3149F97F.1A71@oc.com>
  8. References: <4i17r9$2kn@maltese.eag.unisysgsg.com> <4i1cvg$1cg@solutions.solon.com> <4ic5kp$d0g@athos.cc.bellcore.com>
  9. NNTP-Posting-Host: external.oc.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Sandeep V. Tamhankar wrote:
  16.  > 
  17.  > Another way to convert integer to ASCII is to add char '0' to your
  18.  > integer.  Like so:
  19.  > 
  20.  >              int asc;
  21.  >              asc= known_int + '0';
  22.  > 
  23.  > This way, you don't have to load any function and there is no overhead.
  24.  > 
  25.  
  26. Sandeep, think about your suggestion some.   How many integers will it
  27. work for?    How many integers do you hope it to work for?
  28.  
  29. What will you end up with?  What does one usually want to have after
  30. converting an arbitrary integer to ASCII?
  31.